package com.liuyu.common.framework.spring.aware;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.MessageSource;
import org.springframework.context.MessageSourceAware;
import org.springframework.stereotype.Component;

/**
 * @ClassName MessageSourceAwareTest
 * @Author: liuyu
 * @Date: Created in 2021/8/16 23:29
 * @Version: 1
 * @Modified By:
 */
@Slf4j
@Component
public class MessageSourceAwareTest implements MessageSourceAware {
    /**
     * Set the MessageSource that this object runs in.
     * <p>Invoked after population of normal bean properties but before an init
     * callback like InitializingBean's afterPropertiesSet or a custom init-method.
     * Invoked before ApplicationContextAware's setApplicationContext.
     * @param messageSource message source to be used by this object
     */
    @Override
    public void setMessageSource(MessageSource messageSource) {
        log.error("messageSource 调用");
    }
}
